<?php

date_default_timezone_set('Europe/Paris');

require_once '../classes/minime.php';

spl_autoload_register('MiniMe::autoload', false);

if(empty($argv[1])) {
    
    echo "Dude, add a parameter (jid to query).\n";
    exit;
}

$uri = $argv[1];
//$uri = "http://identi.ca/tkoski";
//$uri = "tkoski@identi.ca";
//$uri = "koski@lobstermonster.org";
//$uri = "http://lobstermonster.org/profile/koski";
//$uri = "julien.dasilva@gmail.com";
//$uri = "http://cliqset.com/user/dbounds";
//$uri = "dbounds@cliqset.com";
//$uri = 'http://eschnou.com/';
////$uri = 'https://n-1.artelibredigital.net/pg/profile/caedes';
//$uri = "http://identi.ca/group/debian";

$discoverer = new Mm_Discovery($uri, Mm_Logger::getInstance());

if($discoverer->discover()) {
    var_dump($discoverer->asArray());
    echo $discoverer->asText();
    
} else {
    echo "\n\tCould not find atom feed for uri '" . $uri . "'.\n";
}
echo "\n\n";